
<%= simple_form_for(@partner_category) do |f| %>
  <%= f.error_notification %>
  <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>

  <div class="form-inputs">
    <%= f.input :code, label:'往来单位编码' %>
    <%= f.input :name , label: '往来单位'%>
    <%= f.input :parent_id, label: '上级单位', collection: PartnerCategory.all.map{|p| [p.code+"   "+p.name, p.id] } %>
  </div>

  <div class="form-actions">
    <%= f.button :submit,'提交', class:'btn btn-blue btn-xs' %>
  </div>
<% end %>
